package com.luych.toolbox.data.service.entity;

import com.luych.toolbox.common.enums.DataBackupHistoryStatus;
import com.luych.toolbox.common.enums.DataBackupHistoryType;
import com.luych.toolbox.common.service.base.BaseEntity;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "data_backup_history")
public class DataBackupHistory extends BaseEntity {

    @Column(name = "data_source_id")
    private String dataSourceId;
    @Column(name = "data_agent_id")
    private String dataAgentId;
    @Column(name = "data_backup_plan_id")
    private String dataBackupPlanId;
    @Column(name = "name")
    private String name;
    @Column(name = "type")
    private DataBackupHistoryType type;
    @Column(name = "file")
    private String file;
    @Column(name = "status")
    @Enumerated(EnumType.STRING)
    private DataBackupHistoryStatus status;
    @Column(name = "error_message")
    private String errorMessage;
    @Column(name = "error_trace")
    private String errorTrace;
    @Column(name = "owner_id")
    private String ownerId;
    @Column(name = "start_date")
    private Date startDate;
    @Column(name = "complete_date")
    private Date completeDate;

    public String getDataSourceId() {
        return dataSourceId;
    }

    public void setDataSourceId(String dataSourceId) {
        this.dataSourceId = dataSourceId;
    }

    public String getDataAgentId() {
        return dataAgentId;
    }

    public void setDataAgentId(String dataAgentId) {
        this.dataAgentId = dataAgentId;
    }

    public String getDataBackupPlanId() {
        return dataBackupPlanId;
    }

    public void setDataBackupPlanId(String dataBackupPlanId) {
        this.dataBackupPlanId = dataBackupPlanId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DataBackupHistoryType getType() {
        return type;
    }

    public void setType(DataBackupHistoryType type) {
        this.type = type;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public DataBackupHistoryStatus getStatus() {
        return status;
    }

    public void setStatus(DataBackupHistoryStatus status) {
        this.status = status;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getErrorTrace() {
        return errorTrace;
    }

    public void setErrorTrace(String errorTrace) {
        this.errorTrace = errorTrace;
    }

    public String getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(String ownerId) {
        this.ownerId = ownerId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getCompleteDate() {
        return completeDate;
    }

    public void setCompleteDate(Date completeDate) {
        this.completeDate = completeDate;
    }
}